﻿using Inovout.Cloud.Namespace.Models;
using Inovout.Repositories;
using NHibernate.Criterion;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Inovout.Cloud.Namespace.Repositories
{
    public class NodeRepository : DataObjectRepository<Node>
    {
        public IList<Node> FindNode(string category,string path)
        {
            ICriterion[] criterioins = new ICriterion[] {Restrictions.Eq("Category", category).IgnoreCase(), Restrictions.Eq("Path", path).IgnoreCase() };
            IList<Node> list = base.FindAll(criterioins);
            return list; 
        }
    }
}
